#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>

#define MAX_CH 100
int
main(int argc, char *argv[])
{
	char buf[MAX_CH] = "s r 0 100\n";
	int num1, num2, readNum;
	char cmdCh, type, whence;

	readNum = sscanf(buf, "%c %c %d %d %c", &cmdCh, &type, &num1, &num2, &whence);
	printf("original input: %s", buf);
	printf("readNum: %d\n", readNum);
	printf("got input: %c %c %d %d %c\n", cmdCh, type, num1, num2, whence);
}

